<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
    </head>
    <body>
        <script>
            function Phone(brand,price){
                this.brand = brand;
                this.price = price;
            };
            Phone.prototype.call = function(){
                console.log("我可以打电话");
            };

            function Smartphone(brand,price,color){
                // super(brand,price);
                Phone.call(this,brand,price);
                this.color = color;
            };
            Smartphone.prototype = new Phone;

            Smartphone.prototype.photo = function(){
                console.log("我可以唱歌！");
            };

            console.log(new Smartphone("真我",3100,"白色").photo());

        </script>
    </body>
</html>